/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { MessageDto } from '../models/MessageDto';
import type { MessageMemberDto } from '../models/MessageMemberDto';
import type { MessageQueryCriteria } from '../models/MessageQueryCriteria';
import type { MessageReadDto } from '../models/MessageReadDto';
import type { MessageReadInfoCriteria } from '../models/MessageReadInfoCriteria';
import type { MessageRecallDto } from '../models/MessageRecallDto';
import type { RListMessageReadInfoVo } from '../models/RListMessageReadInfoVo';
import type { RMessageVo } from '../models/RMessageVo';
import type { RPageMessageReadVo } from '../models/RPageMessageReadVo';
import type { RPageMessageVo } from '../models/RPageMessageVo';
import type { RString } from '../models/RString';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class MessageService {

    /**
     * 撤回消息
     * @param requestBody
     * @returns RString OK
     * @throws ApiError
     */
    public static recallMsg(
        requestBody: MessageRecallDto,
    ): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: '/api/1.0/message/msg/recall',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 获取消息的已读未读总数
     * @param requestBody
     * @returns RListMessageReadInfoVo OK
     * @throws ApiError
     */
    public static getReadInfo(
        requestBody: MessageReadInfoCriteria,
    ): CancelablePromise<RListMessageReadInfoVo> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: '/api/1.0/message/msg/read',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 消息阅读上报
     * @param requestBody
     * @returns RString OK
     * @throws ApiError
     */
    public static msgRead(
        requestBody: MessageMemberDto,
    ): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/message/msg/read',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 获取某一房间里面的用户信息
     * 获取某一房间里面的用户信息
     * @param requestBody
     * @returns RPageMessageVo OK
     * @throws ApiError
     */
    public static queryMessage(
        requestBody: MessageQueryCriteria,
    ): CancelablePromise<RPageMessageVo> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/message/public/msg/page',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 用户发送消息
     * 用户发送消息
     * @param requestBody
     * @returns RMessageVo OK
     * @throws ApiError
     */
    public static sendMsg(
        requestBody: MessageDto,
    ): CancelablePromise<RMessageVo> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/message/msg',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 获取消息的已读未读列表
     * @param requestBody
     * @returns RPageMessageReadVo OK
     * @throws ApiError
     */
    public static getReadPage(
        requestBody: MessageReadDto,
    ): CancelablePromise<RPageMessageReadVo> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/message/msg/read/page',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @returns string OK
     * @throws ApiError
     */
    public static hello2(): CancelablePromise<string> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/1.0/message/hello',
        });
    }

}
